/*
 * table行展开之后里面的内容
 * @Author: ljb 
 * @Date: 2018-01-10 16:07:59 
 * @Last Modified by: ljb
 * @Last Modified time: 2018-01-31 17:12:20
 */
<style lang="less" rel="stylesheet/less" type="text/less" scoped>

    .expand-row{
        margin-bottom: 16px;
    }

    .row-data {
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px dashed #ccc;
        text-align: center;
    }

</style>
<template>
<div>
   
    <Row v-if="row.get_sub_categories && row.get_sub_categories.length > 0" v-for="category in row.get_sub_categories" :key="category.id" type="flex" justify="space-between" class="row-data">
        <Col span="6">
            <span class="expand-key">子分类名称：</span>
            <span class="expand-value">{{ category.name || '-' }}</span>
        </Col>
        <Col span="5">
            <span class="expand-key">子分类描述：</span>
            <span class="expand-value">{{ category.description || '-' }}</span>
        </Col>
        <Col span="5">
            <span class="expand-key">优先级：</span>
            <span class="expand-value">{{ category.priority || 0 }}</span>
        </Col>
        <Col span="5">
            <span class="expand-key">创建时间：</span>
            <span class="expand-value">{{ category.created_at || '-' }}</span>
        </Col>
        <Col span="3">
            <Button size="small" style="margin-right:5px" @click="$emit('edit',[category.id, 'is_not_top', category.super_id])" type="primary">修改分类</Button>
            <Button size="small" @click="$emit('delete',category.id)" type="error">删除分类</Button>
        </Col>
    </Row>

    <Row v-if="row.get_sub_categories && row.get_sub_categories.length === 0" type="flex" justify="space-between" class="row-data">
        <Col span="24">暂无数据</Col>
    </Row>
</div>
</template>

<script>
export default {

    name: 'expand-row',

    props: {

        row : {

            type: Object,

            default () {

                return {
                    
                    
                };
            }
        }
    },

    data: function() {	
        return {

        }
    },
    methods: {

    }
}
</script>